all : test

GCC_VERSION = 43
BOOST_VERSION = 1_37
INC_PATH = -I/usr/local/include/boost
LIB_PATH = -L/usr/local/lib
LIB = -lboost_system-gcc$(GCC_VERSION)-mt-$(BOOST_VERSION) \
      -lboost_thread-gcc$(GCC_VERSION)-mt-$(BOOST_VERSION) \
      -lboost_regex-gcc$(GCC_VERSION)-mt-$(BOOST_VERSION)  \
      -lboost_filesystem-gcc$(GCC_VERSION)-mt-$(BOOST_VERSION)

FLAGS = -Wall -g -O2
CPP = g++

.cpp.o:
	$(CPP) $(FLAGS) $(INC) -c $<

test.o : test.cpp config.h
config.o : config.cpp config.h
parse.o : parse.cpp parse.h config.h
client.o : client.cpp client.h config.h
continue.o : continue.cpp continue.h config.h

test : test.o config.o parse.o client.o continue.o
	$(CPP) $^ -o $@ $(LIB_PATH) $(LIB) 

clean :
	rm *.o *.tmp test -rf

run_test : test
	./test "http://127.0.0.1/index.html"
